﻿<!DOCTYPE html>
<html lang="en">
<#assign actice="tList"/>
<#include "../include/resource-head.ftl"/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form role="form" class="form-inline clearfix" id="form" action="">
                                <div class="input-group col-xs-3">
                                    <span class="input-group-addon">用户名</span>
                                    <input type="text" class="form-control" name="name" value="${name!}">
                                </div>
                            </form>
                            <div class="form-tool btn-group">
                                <button class="btn btn-sm btn-success" form="form">
                                    <i class="icon-search"></i>搜索
                                </button>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>用户</th>
                                    <th>血压</th>
                                    <th>心率</th>
                                    <th>血糖</th>
                                    <th>身高</th>
                                    <th>体重</th>
                                    <th>BMI</th>
                                    <th>视力</th>
                                    <th>辨色能力</th>
                                    <th>心脏</th>
                                    <th>肺脏</th>
                                    <th>四肢</th>
                                    <th>淋巴</th>
                                    <th>甲状腺</th>
                                    <th>嗅觉</th>
                                    <th>血常规</th>
                                    <th>彩超</th>
                                    <th>胆固醇</th>
                                    <th>血常规图片</th>
                                    <th>彩超图片</th>
                                    <th>添加时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <td>${item.name!}</td>
                                    <td>${item.xyss!}-${item.xysz!}</td>
                                    <td>${item.xl!}</td>
                                    <td>${item.xt!}</td>
                                    <td>${item.sg!}</td>
                                    <td>${item.tz!}</td>
                                    <td>${item.bmi!}</td>
                                    <td>${item.slz!}-${item.sly!}</td>
                                    <td>${item.bsnl!}</td>
                                    <td>${item.xz!}</td>
                                    <td>${item.fz!}</td>
                                    <td>${item.sz!}</td>
                                    <td>${item.lb!}</td>
                                    <td>${item.jzx!}</td>
                                    <td>${item.xj!}</td>
                                    <td>${item.xdt!}</td>
                                    <td>${item.cc!}</td>
                                    <td>${item.dgc!}</td>
                                    <td><img style="width: 50px" src="${item.xdtpath!}"></td>
                                    <td><img style="width: 50px" src="${item.ccpath!}"></td>
                                    <td>${item.addtime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                    <td>
                                        <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">

                                                <a class="btn btn-xs btn-primary" href="/info/detail/${item.id}">详情</a>

                                        </div>
                                    </td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

<div class="modal fade" tabindex="-1" role="dialog" id="model">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">修改用户密码</h4>
            </div>
            <form action="/user/update" method="post" >
                <div class="modal-body">
                    <input type="hidden" name="id" id="id">
                    <div class="form-group">
                        <input class="form-control" name="password" type="password">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <input type="submit" class="btn btn-primary">
                </div>
            </form>
        </div>
    </div>
</div>


<div class="modal fade" tabindex="-1" role="dialog" id="modelType">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">修改用户角色</h4>
            </div>
            <form action="/user/update" method="post" >
                <div class="modal-body">
                    <input type="hidden" name="id" id="idType">
                    <div class="form-group">
                        <select class="form-control" name="type">
                            <option value="admin">管理员</option>
                            <option value="doctor">医生</option>
                            <option value="user">用户</option>
                        </select>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <input type="submit" class="btn btn-primary">
                </div>
            </form>
        </div>
    </div>
</div>
<#include "../include/resource-script.ftl"/>
<script>
    function update(id) {
        $("#id").val(id);
        $("#model").modal("show");
    }

    function updateType(id) {
        $("#idType").val(id);
        $("#modelType").modal("show");
    }
</script>
</html>

